package com.stefanbertos.tapestry.components;

import org.apache.tapestry5.annotations.Parameter;

/**
 * Edit property dialog.
 * 
 * @author stefan
 * 
 */
public class InputDialog extends AbstractDialog {

    /**
     * If the the edit feature is used this field is preset, else the field is
     * empty on beginning.
     */
    @Parameter(required = false)
    private String input;

    /**
     * Type of input field, this has affect on the component being rendered.
     */
    @Parameter(required = true)
    private InputType type;

    /**
     * Enum for input type parameter.
     * 
     * @author stefan
     * 
     */
    public enum InputType {
        /** simple input text field. */
        TextInput,
        /** larger text area. */
        TextArea,
        /** date field component. */
        DateField
    };

    /**
     * Default constructor.
     */
    public InputDialog() {
        super();
    }
}
